
use Data/event_study_sample_quartsince2006.dta, clear

* collapse to time series only
collapse (mean)  green_plan  cum new [aweight=NCustomer]  , by(year)



label variable green_plan "Share Green"
label variable cum "Solar Rooftops (000s)"
label variable year "Year"



twoway (connected green_plan year ,  lcolor(gs0) lpattern(dash) msymbol(none) lwidth(thick) )   ///
(connected cum year , lcolor(gs9) msymbol(none)  lwidth(thick) lpattern(solid) yaxis(2)) ///
  if year >= 2009 & year< 2016 , xtitle("Year" , size(large)) ytitle("Share Green", axis(1) size(large)) ///
  ytitle("Solar Rooftops (000s)", axis(2) size(large)) ///
   legend(bmargin(zero) region(lstyle(none)) rows(1) size(large)) xlabel(2009(2)2015, labsize(large)) ///
   ylabel( , axis(1) labsize(large))  ylabel( , axis(2) labsize(large))
   
 graph export Analysis/Time_variation_yearweight.png, replace

 graph export Analysis/Time_variation_yearweight.eps, replace
